home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000088_icon-group-sender_Thu Jul 5 08:58:19 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f65Fw7c19281
for icon-group-addresses; Thu, 5 Jul 2001 08:58:07 -0700 (MST)
Message-Id: <200107051558.f65Fw7c19281@baskerville.CS.Arizona.EDU>
Date: Wed, 4 Jul 2001 10:13:14 +0100 (BST)
From: Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk>
X-Sender: hgs@neelix
To: Art Eschenlauer <art.eschenlauer@sufsys.com>
cc: "'icon-group@CS.Arizona.EDU'" <icon-group@cs.arizona.edu>
Subject: Re: Software testing for Icon?
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 1753
On Mon, 25 Jun 2001, Art Eschenlauer wrote:
> One concern that I expect people to raise with respect to using Icon in the
> "mainstream" is, "Icon cannot be trusted because it does not typecheck
> arguments at compile time. How can you protect against programmer errors in
> the arguments passed during infrequently-executed invocations?" I don't
This assumes static typing. This often comes up on the Ruby-Talk list
(See below http://www.ruby-lang.org/ for info on the mailing list, which
can be searched from there.)
I think this is true for other dynamic languages. It is argued that
the flexibility is worth this particular cost, and also that development
is speeded up because of not having to declare everything up front.
No-one has cited studies to support this yet, though.
> think that the response (however true) that C++ has compile-time
> type-checking and yet still is notorious for null pointer errors, etc, will
> convince anybody.
>
> This raises two questions in my mind regarding Icon:
>
> 1. Should one adopt a "defensive programming style", always checking the
> arguments passed to each routine?
The concept of "design by contract" may be useful, even if not implememted
in the language. You agree to use my function subject to your providing
the right args, and provided you do that I'll give you the correct results.
If you don't provide the right args, then there is nothing in the contract
that forces me to give you the right answer. It is a business model.
>
> 2. What work has been done on developing rigorous software-testing
> methodology for Icon programs?
I don't know. With Icon not being OO, I'm not sure if one can apply
unit testing to it, but it has been done somehow in C, so maybe...
>
>
Hugh